import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
import { PropSidebarItemLink } from "@docusaurus/plugin-content-docs";
import frigateHttpApiSidebar from "./docs/integrations/api/sidebar";

const sidebars: SidebarsConfig = {
  docs: {
    Frigate: [
      "frigate/index",
      "frigate/hardware",
      "frigate/planning_setup",
      "frigate/installation",
      "frigate/updating",
      "frigate/camera_setup",
      "frigate/video_pipeline",
      "frigate/glossary",
    ],
    Guides: [
      "guides/getting_started",
      "guides/configuring_go2rtc",
      "guides/ha_notifications",
      "guides/ha_network_storage",
      "guides/reverse_proxy",
    ],
    Configuration: {
      "Configuration Files": [
        "configuration/index",
        "configuration/reference",
        {
          type: "link",
          label: "Go2RTC Configuration Reference",
          href: "https://github.com/AlexxIT/go2rtc/tree/v1.9.10#configuration",
        } as PropSidebarItemLink,
      ],
      Detectors: [
        "configuration/object_detectors",
        "configuration/audio_detectors",
      ],
      Enrichments: [
        "configuration/semantic_search",
        "configuration/face_recognition",
        "configuration/license_plate_recognition",
        "configuration/bird_classification",
        {
          type: "category",
          label: "Custom Classification",
          link: {
            type: "generated-index",
            title: "Custom Classification",
            description: "Configuration for custom classification models",
          },
          items: [
            "configuration/custom_classification/state_classification",
            "configuration/custom_classification/object_classification",
          ],
        },
        {
          type: "category",
          label: "Generative AI",
          link: {
            type: "generated-index",
            title: "Generative AI",
            description: "Generative AI Features",
          },
          items: [
            "configuration/genai/genai_config",
            "configuration/genai/genai_review",
            "configuration/genai/genai_objects",
          ],
        },
      ],
      Cameras: [
        "configuration/cameras",
        "configuration/review",
        "configuration/record",
        "configuration/snapshots",
        "configuration/motion_detection",
        "configuration/birdseye",
        "configuration/live",
        "configuration/restream",
        "configuration/autotracking",
        "configuration/camera_specific",
      ],
      Objects: [
        "configuration/object_filters",
        "configuration/masks",
        "configuration/zones",
        "configuration/objects",
        "configuration/stationary_objects",
      ],
      "Hardware Acceleration": [
        "configuration/hardware_acceleration_video",
        "configuration/hardware_acceleration_enrichments",
      ],
      "Extra Configuration": [
        "configuration/authentication",
        "configuration/notifications",
        "configuration/ffmpeg_presets",
        "configuration/pwa",
        "configuration/tls",
        "configuration/advanced",
      ],
    },
    Integrations: [
      "integrations/plus",
      "integrations/home-assistant",
      // This is the HTTP API generated by OpenAPI
      {
        type: "category",
        label: "HTTP API",
        link: {
          type: "generated-index",
          title: "Frigate HTTP API",
          description: "HTTP API",
          slug: "/integrations/api/frigate-http-api",
        },
        items: frigateHttpApiSidebar,
      },
      "integrations/mqtt",
      "integrations/homekit",
      "configuration/metrics",
      "integrations/third_party_extensions",
    ],
    "Frigate+": [
      "plus/index",
      "plus/annotating",
      "plus/first_model",
      "plus/faq",
    ],
    Troubleshooting: [
      "troubleshooting/faqs",
      "troubleshooting/recordings",
      "troubleshooting/gpu",
      "troubleshooting/edgetpu",
      "troubleshooting/memory",
    ],
    Development: [
      "development/contributing",
      "development/contributing-boards",
    ],
  },
};

export default sidebars;
